/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('cms_article_label', {
    al_id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    al_code: {
      type: DataTypes.STRING(20),
      allowNull: true
    },
    al_parent_id: {
      type: DataTypes.INTEGER(10),
      allowNull: false
    },
    al_isparent: {
      type: DataTypes.INTEGER(1),
      allowNull: true,
      defaultValue: '0'
    },
    al_parent_ids: {
      type: DataTypes.STRING(200),
      allowNull: false
    },
    al_name: {
      type: DataTypes.STRING(100),
      allowNull: false
    },
    al_type: {
      type: DataTypes.CHAR(3),
      allowNull: true,
      defaultValue: '0'
    },
    al_sort: {
      type: DataTypes.INTEGER(10),
      allowNull: false
    },
    al_other_attr: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    al_partners_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    },
    al_org_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    },
    al_create_by: {
      type: DataTypes.STRING(64),
      allowNull: false
    },
    al_del_flag: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      defaultValue: '0'
    },
    al_is_write: {
      type: DataTypes.INTEGER(4),
      allowNull: true,
      defaultValue: '1'
    },
    al_description: {
      type: DataTypes.STRING(100),
      allowNull: true
    },
    al_create_date: {
      type: DataTypes.DATE,
      allowNull: false
    }
  }, {
    tableName: 'cms_article_label'
  });
};
